USE [PaltopDatabase]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_SuperUser_Account]') AND parent_object_id = OBJECT_ID(N'[dbo].[SuperUser]'))
ALTER TABLE [dbo].[SuperUser] DROP CONSTRAINT [FK_SuperUser_Account]
GO

USE [PaltopDatabase]
GO

/****** Object:  Table [dbo].[SuperUser]    Script Date: 02/04/2012 20:24:44 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SuperUser]') AND type in (N'U'))
DROP TABLE [dbo].[SuperUser]
GO

USE [PaltopDatabase]
GO

/****** Object:  Table [dbo].[SuperUser]    Script Date: 02/04/2012 20:24:44 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[SuperUser](
	[Name] [nvarchar](50) NULL,
	[Sex] [nvarchar](50) NULL,
	[Email] [nvarchar](50) NULL,
	[Birthday] [datetime] NULL,
	[Country] [nvarchar](50) NULL,
	[AccountID] [int] NOT NULL,
	[ProfilePic] [nvarchar](50) NULL,
	[SuperUserID] [int] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_SuperUser] PRIMARY KEY CLUSTERED 
(
	[SuperUserID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[SuperUser]  WITH CHECK ADD  CONSTRAINT [FK_SuperUser_Account] FOREIGN KEY([AccountID])
REFERENCES [dbo].[Account] ([AccountID])
GO

ALTER TABLE [dbo].[SuperUser] CHECK CONSTRAINT [FK_SuperUser_Account]
GO


